/**
 * Created by victor on 2016/9/27.
 */
var webpack = require('webpack');
var path = require('path');

var BUILD_DIR = path.resolve(__dirname, 'build');
var APP_DIR = path.resolve(__dirname, 'views/scripts');

var config = {
    entry: APP_DIR + '/main.js',
    output: {
        BUILD_DIR,
        filename: 'bundle.js'
    },
    module: {
        loaders: [{
            test: /\.js$/,
            loader: 'babel?presets[]=es2015',
            exclude: path.resolve(__dirname,'node_modules'),
            query:{
                presets:['es2015']
            }
        }]
    },
    //resolve 指定可以被 import 的文件后缀
    resolve: {
        extensions: ['', '.js', '.jsx']
    },

};

module.exports = config;